//
//  RenWuHeaderView.m
//  ShouYi
//
//  Created by yrapp on 16/2/24.
//  Copyright © 2016年 yurui. All rights reserved.
//

#import "RenWuHeaderView.h"

@implementation RenWuHeaderView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
 
        
        // 搜索按钮
        self.searchBt = [UIButton buttonWithType:UIButtonTypeCustom];
        self.searchBt.frame = CGRectMake(0,20, 60,40);
        [self.searchBt setImage:[UIImage imageNamed:@"icon_sou.png"] forState:UIControlStateNormal];
        self.searchBt.imageEdgeInsets = UIEdgeInsetsMake(10, 20, 10, 20);
        [self addSubview:_searchBt];
        // image
        self.imageV = [[UIImageView alloc]initWithFrame:CGRectMake(kWidth / 2 - 60, 25, 120, 30)];
        self.imageV.image = [UIImage imageNamed:@"icon_qg.png"];
        self.imageV.userInteractionEnabled = YES;
        [self addSubview:_imageV];
        // 全国
        self.countryBt = [UIButton buttonWithType:UIButtonTypeCustom];
        self.countryBt.frame = CGRectMake(0, 0, 60, 30);
        [self.countryBt setTitle:@"全国" forState:UIControlStateNormal];
        [self.countryBt setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.countryBt.titleLabel.font = [UIFont systemFontOfSize:15];
        [self.imageV addSubview:_countryBt];
        //本地
        self.benDiBt = [UIButton buttonWithType:UIButtonTypeCustom];
        self.benDiBt.frame = CGRectMake(60, 0, 60, 30);
        [self.benDiBt setTitle:@"本地" forState:UIControlStateNormal];
        [self.benDiBt setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.benDiBt.titleLabel.font = [UIFont systemFontOfSize:15];
        [self.imageV addSubview:_benDiBt];
        // 信息
        self.messageBt = [UIButton buttonWithType:UIButtonTypeCustom];
        self.messageBt.frame = CGRectMake(kWidth - 60 , 20, 60, 40);
        self.messageBt.imageEdgeInsets = UIEdgeInsetsMake(10, 20, 10, 20);
        [self.messageBt setImage:[UIImage imageNamed:@"icon_xinf.png"] forState:UIControlStateNormal];
        [self addSubview:_messageBt];
    }
    return self;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
